<template>
	<!-- cell -->
	<div style="padding: 12px;background-color: #FFFFFF;" @click="loadDetail()">
		<!-- row1 -->
		<div style="display: flex;align-items: center;flex-direction: row;">
			<div class="" style="display: flex;align-items: center;flex: 1;">
				<div style="font-size: 16px;">{{data['stuName']}}</div>
				<div style="font-size: 12px;color: #999999;margin-left: 12px;">手动录入</div>
			</div>
			<div style="
				display: flex;align-items: center; 
				padding: 3px 10px;max-width: 90px;">
				<div :style="{'text-align': 'center','font-size': '12px','color': color,'display': 'block'}">{{statustxt}}</div>
			</div>
		</div>
		<!-- row2 -->
		<div style="flex: 1;flex-direction: column;display: flex;overflow: hidden;">
			<div style="font-size: 12px;color: #999999;margin-top: 5px;">订单号：{{data['orderSn']}}</div>
		</div>
		<!-- row3 -->
		<div
			style="flex: 1;flex-direction: row;display: flex;overflow: hidden;justify-content: space-between;">
			<div style="font-size: 12px;color: #999999;margin-top: 5px;">课程数：{{data["proNum"]}}</div>
		</div>
		<!-- row4 -->
		<div
			style="flex: 1;flex-direction: row;display: flex;overflow: hidden;justify-content: space-between;">
			<div style="display: flex;align-items: center;">
				<div style="font-size: 12px;color: #999999;margin-top: 5px;">提交时间：{{data['updateTime']}}</div>
			</div>
			<div
				style="
				display: flex;align-items: center;
				padding: 3px 10px;border-style: solid;border-width: 1px;border-color: #007AFF;border-radius: 16px;max-width: 90px;">
				<div style="text-align: center;font-size: 12px;color: #007AFF;display: block;">推送</div>
				<div class="iconfont icon-fasong" style="font-size: 10px;color: #007AFF;margin-left: 5px;display: block;"></div>
			</div>
		</div>
		<!-- line -->
		<div style="height: 1px;background-color: #ebebeb;margin-top: 10px;" />
	</div>
</template>

<script>
	export default {
		props:["data"],//status: 0 no-pay 1 pay-part 2 pay-all 3 back-all 4 back-part 5 cansel
		name:"order-list-cell",
		data() {
			return {
				color:'',
				statustxt:"",
			};
		},
		created() {
			let cols =["#ff0000","#ffaa00","#00aa00","#333333","#ff0000","#999999"]
			let txts = ['待支付','已支付定金','已支付全款','全额退款','部分退款','已取消']
			this.color = cols[this.data.status]
			this.statustxt = txts[this.data.status]
		},
		
		methods:{
			loadDetail(){
				this.$emit("click")
			}
		}
	}
</script>

<style>

</style>
